﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Views_MasterPageViews : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            if (HttpContext.Current.Session["AdminLogined"] != null)
            {
                Adminstrastion admin = (Adminstrastion)HttpContext.Current.Session["AdminLogined"];
                lblManager.Text = admin.Username;
            }
            else
            {
                Response.Redirect("~/Default.aspx");
            }
        }
    }
    protected void linkLogout_Click(object sender, EventArgs e)
    {
        HttpContext.Current.Session["AdminLogined"] = null;
        Response.Redirect("~/Default.aspx");
    }
}